package com.beecloud.microservice.user.commom;

import javaslang.collection.List;
import org.apache.commons.lang.StringUtils;

import java.util.Optional;

public class RichString {
    public static boolean nonBlank(String... target){
       return target != null && List.of(target).forAll(StringUtils::isNotBlank);
    }

    public static Optional<String> trimOp(String target) {
        return Optional.ofNullable(target).map(String::trim).filter(s -> s.length() > 0);
    }


}
